﻿@model RonYee.Models.MvcPage

@{
    ViewBag.Title = "订单查询";
    Layout = "~/Views/Shared/_LayoutOfSecondPage.cshtml";
}

<script type="text/javascript">

    function getAjaxPageDate(CurrentPageIndex) {
        var dataStr = "CurrentPageIndex=" + CurrentPageIndex;
        $.ajax({
            type: "POST",
            url: "/Order/PageIndex",
            data: dataStr,
            contentType: "application/x-www-form-urlencoded;charset=UTF-8",
            async: false, // 同步  true 异步。默认是异步
            error: function (datas) {
                alert(datas);
            },
            success: function (data) {
                $('#content').html(data);
            }
        });
    }
</script>


<div class="box_padding" id="content">
<h3><i class="ui-icons"></i>订单检索</h3>
    <div class="box_top ui-icons"></div>
    <div class="box_bg">
      <div class="box_padding">
       <div class="border_line">
          @using (Html.BeginForm("Search", "Order", FormMethod.Post))
            {
                <table width="100%" border="0" id="MyTable" cellpadding="0" cellspacing="0">
                <tbody>
                <tr>
                    <td  class="tdName">订单编号</td>
                    <td  class="tdData">
                        <input type="text" id="s_id" name="s_id"/>
                    </td>
                    <td class="tdName">递交者</td>
                    <td class="tdData">
                        <input type="text" id="s_name" name="s_name"/>
                    </td>
                </tr>
                <tr>
                    <td  class="tdName">学 号</td>
                    <td  class="tdData">
                        <input type="text" id="s_no" name="s_no"/>
                    </td>
                    <td class="tdName">提交日期</td>
                    <td class="tdData">
                        <input type="text" id="s_time" name="s_time"/>
                    </td>
                </tr>
                <tr>
                    <td class="tdData"></td>
                    <td class="tdData"></td>
                    <td class="tdData"></td>
                    <td class="tdData">
                        <input type="submit" value="查询》" class="Button1 ui-icons" />
                    </td>
                </tr>  
                </tbody>
                </table>
                    
            }
        
       </div>
      </div>
    </div>
    <div class="box_down ui-icons"></div>

    @using (Html.BeginForm("PageIndex", "Order", FormMethod.Post))
    { 
    <h3><i class="ui-icons"></i>所有图书订单</h3>
    <div class="box_top ui-icons"></div>
    <div class="box_bg"><div class="box_padding">
    <div class="border_line">
        <table width="100%" border="0" cellpadding="0" cellspacing="0"><tbody>
        <tr>
            <th class="tdName">
                选择
            </th>
            <th class="tdName">
                订单编号
            </th>
            <th class="tdName">
                递交者
            </th>
            <th class="tdName">
                学 号
            </th>
            <th class="tdName">
                订单状态
            </th>
            <th class="tdName">
                联系方式
            </th>
            <th class="tdName">
                订单价格
            </th>
            <th class="tdName">
                递交日期
            </th>
            <th class="tdName">
                订单详细
            </th>
        </tr>

        @foreach (RonYee.Models.Order item in Model.OrderList)
        {
        <tr>
            <td class="tdData">
                <input type="checkbox"  id="CheckId" value="@item.OrderId" />
            </td>
            <td class="tdData">
                @Html.DisplayFor(modelItem => item.OrderId)
            </td>
            <td class="tdData">
                @Html.DisplayFor(modelItem => item.Username)
            </td>
            <td class="tdData">
                @Html.DisplayFor(modelItem => item.UserNo)
            </td>
            <td class="tdData">
                @Enum.GetName(typeof(RonYee.Models.Enum.OrderState),Convert.ToInt32(item.Status))
            </td>
            <td class="tdData">
                @Html.DisplayFor(modelItem => item.Phone)
            </td>
            <td class="tdData">
                @Html.DisplayFor(modelItem => item.Total)
            </td>
            <td class="tdData">
                @Html.DisplayFor(modelItem => item.OrderDate)
            </td>
            <td class="tdData">
                @Html.ActionLink("详细", "Details", new { id = item.OrderId }) 
            </td>
        </tr>
        }
        </tbody>
        </table> 
        <center>@Html.Partial("~/Views/Shared/_PageIndex.cshtml", Model)</center> 
    </div>
    </div>
    </div>
    <div class="box_down ui-icons"></div>
  }
 </div>

 <div class="line_top"></div>


